<?php
# MySQL Database
define('MYSQL_DB_HOST',           '127.0.0.1');
define('MYSQL_DB_USER',           'root');
define('MYSQL_DB_PASS',           '');
define('MYSQL_DB_NAME',           'material');
define('MYSQL_DB_CHARSET',        'utf8');

# Tables
define('DB_TBL_PREFIX',      '');
define('TBL_USER',           DB_TBL_PREFIX . '_user');
define('TBL_PROJECT',        DB_TBL_PREFIX . '_project');
define('TBL_MATERIAL',       DB_TBL_PREFIX . '_material');
define('TBL_MODULE',         DB_TBL_PREFIX . '_module');

# Roles
define('ROLE_MANAGER',           '1');
define('ROLE_PLANNER',           '2');
define('ROLE_BUYER',             '3');
define('ROLE_SUMMARY',           '4');
define('ROLE_MATERIAL',          '5');
define('ROLE_WORKER',            '6');

# Constants
# --User
define('USER_STATUS_DELETED',        '-1');
define('USER_STATUS_NORMAL',         '1');
define('USER_STATUS_BANNED',          '0');

# --Project
define('PROJECT_STATUS_DELETED',     '-1');
define('PROJECT_STATUS_PAUSED',      '0');
define('PROJECT_STATUS_NORMAL',      '1');
define('PROJECT_PROCESS_PREPARE',    '0');
define('PROJECT_PROCESS_ONGOING',    '1');
define('PROJECT_PROCESS_FINISHED',   '-1');

# --Module
define('MODULE_STATUS_DELETED',      '-1');
define('MODULE_STATUS_DISABLED',     '0');
define('MODULE_STATUS_NORMAL',       '1');

# --Material
define('MATERIAL_STATUS_DELETED',      '-1');
define('MATERIAL_STATUS_DISABLED',     '0');
define('MATERIAL_STATUS_NORMAL',       '1');

# Session Keys
define('SESSION_CAPTCHA_USER',  'captcha_user');
define('SESSION_USER_INFO',     'user_info');

# Default Values
define('DEFAULT_DATE',             '1000-01-01 00:00:00');
define('DEFAULT_USER_PASS',        '111111');

# Format
define('FORMAT_DATE', 'Y-m-d H:i:s');